package com.jiyun.purse.controller;

import com.jiyun.pojo.purse.Attestation;
import com.jiyun.purse.service.AttestationService;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/attestation")
public class AttestationController {
    @Autowired
    private AttestationService attestationService;

    @GetMapping("/findAttestation")
    public Result findAttestation(Integer userId){
        return attestationService.findAttestation(userId);
    }

    @PostMapping("/addAttestation")
    public Result addAttestation(@RequestBody Attestation attestation){
        return attestationService.addAttestation(attestation);
    }
}
